package com.bjesc_b2c.app.appraiset.utils;

import android.content.Context;
import android.graphics.Bitmap;

import cn.finalteam.galleryfinal.CoreConfig;
import cn.finalteam.galleryfinal.FunctionConfig;
import cn.finalteam.galleryfinal.ThemeConfig;

/**
 * Created by lenovo on 2017/2/25.
 */

public class GralleryFinalConfig {
    public static ThemeConfig getThemeConfig(){
        return new ThemeConfig.Builder()
                .build();
    }

    public static FunctionConfig getFuncationConfig(){
        return new FunctionConfig.Builder()
                .setEnableCamera(false)
                .setEnableEdit(false)
                .setEnableCrop(false)
                .setEnableRotate(false)
                .setCropSquare(false)
                .setEnablePreview(false)
                .build();
    }

    public static CoreConfig getCoreConfig(Context context){
        Bitmap.Config config = Bitmap.Config.RGB_565;
        FrescoImageLoader imageloader = new FrescoImageLoader(context,config);
        return new CoreConfig.Builder(context, imageloader, getThemeConfig())
                .setFunctionConfig(getFuncationConfig())
                .build();
    }
}
